// import Vue from "vue"
import Vue from 'vue/dist/vue.esm.js'
import Router from 'vue-router'

Vue.use(Router)

const router = new Router({
  routes: [
    {
      path: '',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../components/home'),
      meta: {
        routerPath: '/home'
      },
      children: [
        {
          path: 'test',
          name: 'test',
          component: () => import('../components/test'),
          meta: {
            routerPath: '/test'
          },
        }
      ]
    },
    {
      path: '/table',
      name: 'Table',
      meta: {
        routerPath: '/Table'
      },
      component: () => import('../components/table')
    },
    {
      path: '/losePage',
      name: 'losePage',
      meta: {
        routerPath: '/losePage'
      },
      component: () => import('../components/404')
    }
  ]
})

export default router
